package com.sky.dto;

import com.sky.constant.FormatConstant;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class EmployeeDTO implements Serializable {

    private Long id;

    @ApiModelProperty(value = "用户账号", required = true)
    @NotBlank(message = "用户账号不能为空")
    private String username;

    @NotBlank(message = "用户名不能为空")
    private String name;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = FormatConstant.PHONE_REGEX, message = "手机号格式错误")
    private String phone;

    @NotBlank(message = "用户性别不能为空")
    private String sex;

    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = FormatConstant.ID_NUMBER_REGEX, message = "身份证号格式错误")
    private String idNumber;

}
